<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>商品列表</title>
    <link rel="stylesheet" href="../../css/wxq.css">
    <link rel="stylesheet" href="../../css/base.css">
    <link rel="stylesheet" href="../../font/css/font-awesome.min.css">
    <style>
        #page_val::-webkit-input-placeholder { /* WebKit browsers */
            font-size: 12px;
            color: #4E5465;
        }
        #page_val {
            box-shadow: none;
            outline: none;
            color: #4E5465;
        }
    </style>
</head>
<body>

<!--头部公共样式-->
<header class="header">
    <div class="logo float_left"><a href="../index/index.html">后台管理系统</a></div>
    <div class="header_right">
        <nav>
            <ul>
                <li>
                    <a title="更多"><i class="fa fa-navicon"></i></a>
                    <ul class="dropdown_menu">
                        <li id="logout">&nbsp;<i class="fa fa-sign-out"></i>&nbsp;退出</li>
                    </ul>
                </li>
                <li>
                    <a href="../message/messages.html" title = "消息"><i class = "fa fa-envelope"></i></a>
                    <span class="message_count"></span>
                </li>
            </ul>
        </nav>
        <div class = "message_warp_info"></div>
    </div>
</header>

<div class="container">

    <!--左边导航区-->
    <div class="slide" id="slide">

        <!--左边管理员信息区域-->
        <div class="admin_info">
            <a href="#" class="admin_header_img">
                <img src="../../images/test_header.png" alt="">
                <div class="upload_header_img">更换</div>
            </a>
            <div class="admin_detail">
                <span class="admin_type">超级管理员</span>
                <span class="admin_name">王小强</span>
            </div>
        </div>

        <!--左边导航按钮区域-->
        <ul class="menu">
            <li>
                <a href="../index/index.html" class="super_menu">
                    <i class="fa fa-home"></i>&nbsp;&nbsp;首页
                </a>
            </li>
            <li>
                <a class="super_menu">
                    <i class="fa fa-gears"></i>&nbsp;&nbsp;系统配置<i class="fa fa-angle-right"></i>
                </a>
                <ul class="menu_child_list">
                    <li>
                        <a href="../conf/bannerSetting.html">
                            <i class="fa fa-image"></i>&nbsp;&nbsp;banner管理
                        </a>
                    </li>
                </ul>
            </li>

            <li>
                <a class="super_menu">
                    <i class="fa fa-users"></i>&nbsp;&nbsp;用户管理<i class="fa fa-angle-right"></i>
                </a>
                <ul class="menu_child_list isSuper">
                    <li>
                        <a href="../user/userList.html">
                            <i class="fa fa-user"></i>&nbsp;&nbsp;用户列表
                        </a>
                    </li>
                    <li>
                        <a href="../member/memberManagement.html">
                            <i class="fa fa-user-plus"></i>&nbsp;&nbsp;会员管理
                        </a>
                    </li>
                    <li>
                        <a href="../member/integralSetting.html">
                            <i class="fa fa-vcard"></i>&nbsp;&nbsp;积分设置
                        </a>
                    </li>
                </ul>
            </li>
            <li>
                <a class="super_menu active">
                    <i class="fa fa-cart-plus"></i>&nbsp;&nbsp;商城管理<i class="fa fa-angle-right"></i>
                </a>
                <ul class="menu_child_list isSuper" style="display: block">
                    <li>
                        <a href="../category/goodsCategory.html">
                            <i class="fa fa-bar-chart"></i>&nbsp;&nbsp;商品分类
                        </a>
                    </li>
                    <li>
                        <a href="../freight/freightTemplate.html">
                            <i class="fa fa-cart-arrow-down"></i>&nbsp;&nbsp;运费模板
                        </a>
                    </li>
                    <li>
                        <a href="goodsList.html">
                            <i class="fa fa-list"></i>&nbsp;&nbsp;商品列表
                        </a>
                    </li>
                    <li>
                        <a href="../order/orderList.html">
                            <i class="fa fa-first-order"></i>&nbsp;&nbsp;订单管理
                        </a>
                    </li>
                </ul>
            </li>
            <li>
                <a href="../message/messages.html" class="super_menu">
                    <i class="fa fa-comment"></i>&nbsp;&nbsp;消息管理
                </a>
            </li>
            <li>
                <a href="../index/dataStatistics.html" class="super_menu">
                    <i class="fa fa-signal"></i>&nbsp;&nbsp;数据统计
                </a>
            </li>
            <li>
                <a href="../admin/authoritySetting.html" class="super_menu">
                    <i class="fa fa-unlock"></i>&nbsp;&nbsp;权限管理
                </a>
            </li>
        </ul>
    </div>

    <div class="main_content">

        <div class="warp">
            <div class="position">
                <span>当前位置：</span>
                <span>
                    <a>商城管理/</a>
                    <a href="goodsList.html">商品列表</a>
                </span>
            </div>
        </div>


        <div class="warp" id="goods_list">
            <div class="form_item">
                <a href="addGoods.html">
                    <button class="btn btn_default" id="submit">添加商品</button>
                </a>
                <div class="input_div_inline">
                    <select class="form_inline" id = "cat_id">
                        <option value="" >全部</option>
                        <option v-for = "item in categoryList" :value="item.id" v-text = "item.name"></option>
                    </select>
                </div>
                <div class="input_div_inline">
                    <select class="form_inline" id = "is_shelve">
                        <option value="" >全部</option>
                        <option value="1" >已上架</option>
                        <option value="0" >已下架</option>
                    </select>
                </div>
                <button class="btn btn_success" id="query" @click="query">查询</button>
            </div>
            <table class="table table_border_bottom">
                <thead>
                <tr>
                    <th>商品分类</th>
                    <th>商品货号</th>
                    <th>商品名</th>
                    <th>商品库存</th>
                    <th>一般价格</th>
                    <th>会员价格</th>
                    <th>商品状态</th>
                    <th>商品代表图</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <tr v-for="item in resources.list">
                    <td><a class="cursor_p" :href="'../category/updateCategory.html?pid='+item.category.pid" v-text="item.category.name"></a></td>
                    <td v-text="item.goods_sn"></td>
                    <td v-text="item.goods_name"></td>
                    <td ><input type="text" class = "form_inline input_no_border input_text_center goods_number" :data-id = "item.id" :value = "item.goods_number"></td>
                    <td v-text="item.price"></td>
                    <td v-text="item.member_price"></td>
                 <!--   <td><a class="cursor_p" :href="'../freight/freightDetail.html?id='+item.freightModel.id" v-text="item.freightModel.name"></a></td>-->
                    <td v-if="item.is_shelve">已上架<a class="cursor_p" :id="item.id" shelve-type="false" @click="shelve">下架</a></td>
                    <td v-else>已下架 <a class="cursor_p" :id="item.id" shelve-type="true" @click="shelve">上架</a></td>
                    <td><img :src="imgPath+item.pic_main" width="35" height="35" alt=""></td>
                    <td>
                        <a class="cursor_p" :href="'./goodsDetail.html?id='+item.id" title="编辑详情">编辑</a>
                    </td>
                </tr>
                </tbody>
            </table>
            <div class="pagination">
                <button class="btn btn_success float_left" id="edit_num" @click="edit_num">批量修改库存</button>
                <a v-text="'共'+resources.total+'条数据'"></a>
                <input type="number" min="1" style="width: 64px" placeholder="跳转到" id="page_val"/>
                <a @click="first_page" class="first_page">首页</a>
                <a @click="pre_page" class="pre"><i class="fa fa-angle-left"></i></a>
                <a>
                    <span class="current_page" v-text="resources.currentPage"></span>
                    <span>/</span>
                    <span class="total_page" v-text="resources.totalPage"></span>
                </a>
                <a @click="next_page" class="next"><i class="fa fa-angle-right"></i></a>
                <a @click="last_page" class="last_page">尾页</a>
            </div>
        </div>
    </div>
</div>
<script src="../../js/jquery-3.2.1.min.js"></script>
<script src="../../my_js/sockjs.min.js"></script>
<script src="../../my_js/stomp.min.js"></script>
<script src="../../my_js/common.js"></script>
<script src="../../js/wxq.js"></script>
<script src="../../js/vue.min.js"></script>
<script src="../../my_js/goodsList.js"></script>
</body>
</html>